/**
 * Apr 16, 2010
 */
package org.tomale.id.projects.ui;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.editor.FormEditor;
import org.tomale.id.projects.Activator;

/**
 * @author ferd
 *
 */
public class ProjectEditor extends FormEditor {

	public static final String EDITOR_ID = "org.tomale.id.projects.ui.editor.project";

	private ProjectOverviewPage _overview;
	private ProjectTimelinePage _timeline;
	private ProjectTasksPage _tasks;
	
	/* (non-Javadoc)
	 * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
	 */
	@Override
	protected void addPages() {
		_overview = new ProjectOverviewPage(this);
		_timeline = new ProjectTimelinePage(this);
		_tasks = new ProjectTasksPage(this);
		try {
			addPage(_overview);
			addPage(_timeline);
			addPage(_tasks);
		}catch(PartInitException e){
			Activator.logError(e.getMessage());
		}
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
	 */
	@Override
	public void doSave(IProgressMonitor monitor) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
	 */
	@Override
	public void doSaveAs() {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
	 */
	@Override
	public boolean isSaveAsAllowed() {
		return false;
	}
}
